<?php /* Smarty version 2.6.12, created on 2008-10-30 12:57:41
         compiled from admin/main/edit_file.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'admin/main/edit_file.tpl', 9, false),array('modifier', 'strip_tags', 'admin/main/edit_file.tpl', 32, false),)), $this); ?>
<?php func_load_lang($this, "admin/main/edit_file.tpl","lbl_edit_file,txt_edit_file_top_text,lbl_file,lbl_save,lbl_cancel,txt_preview_template_note,lbl_preview_default_css,lbl_preview,txt_restore_template_note,lbl_restore_file,lbl_edit_file"); ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "page_title.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_edit_file'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<?php echo $this->_tpl_vars['lng']['txt_edit_file_top_text']; ?>


<br /><br />

<?php ob_start(); ?>
<a href="file_edit.php?dir=<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['dir'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'url') : smarty_modifier_escape($_tmp, 'url')); ?>
">
<img src="<?php echo $this->_tpl_vars['ImagesDir']; ?>
/folder.gif" width="16" height="16" alt="" />
<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['dir'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
</a>
<br /><br />
<?php echo $this->_tpl_vars['lng']['lbl_file']; ?>
: <b><?php echo $this->_tpl_vars['filename']; ?>
</b>
<p />

<?php if ($this->_tpl_vars['file_type'] == 'image'): ?>

<img src="<?php echo $this->_tpl_vars['SkinDir'];  echo $this->_tpl_vars['filename']; ?>
" alt="" />

<?php else: ?>

<form action="file_edit.php" method="post">
<input type="hidden" name="filename" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['filename'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
<input type="hidden" name="dir" value="<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['dir'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" />
<input type="hidden" name="opener" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['opener'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
<input type="hidden" name="mode" value="save_file" />

<textarea cols="65" rows="30" name="filebody">
<?php unset($this->_sections['file_line']);
$this->_sections['file_line']['name'] = 'file_line';
$this->_sections['file_line']['loop'] = is_array($_loop=$this->_tpl_vars['filebody']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['file_line']['show'] = true;
$this->_sections['file_line']['max'] = $this->_sections['file_line']['loop'];
$this->_sections['file_line']['step'] = 1;
$this->_sections['file_line']['start'] = $this->_sections['file_line']['step'] > 0 ? 0 : $this->_sections['file_line']['loop']-1;
if ($this->_sections['file_line']['show']) {
    $this->_sections['file_line']['total'] = $this->_sections['file_line']['loop'];
    if ($this->_sections['file_line']['total'] == 0)
        $this->_sections['file_line']['show'] = false;
} else
    $this->_sections['file_line']['total'] = 0;
if ($this->_sections['file_line']['show']):

            for ($this->_sections['file_line']['index'] = $this->_sections['file_line']['start'], $this->_sections['file_line']['iteration'] = 1;
                 $this->_sections['file_line']['iteration'] <= $this->_sections['file_line']['total'];
                 $this->_sections['file_line']['index'] += $this->_sections['file_line']['step'], $this->_sections['file_line']['iteration']++):
$this->_sections['file_line']['rownum'] = $this->_sections['file_line']['iteration'];
$this->_sections['file_line']['index_prev'] = $this->_sections['file_line']['index'] - $this->_sections['file_line']['step'];
$this->_sections['file_line']['index_next'] = $this->_sections['file_line']['index'] + $this->_sections['file_line']['step'];
$this->_sections['file_line']['first']      = ($this->_sections['file_line']['iteration'] == 1);
$this->_sections['file_line']['last']       = ($this->_sections['file_line']['iteration'] == $this->_sections['file_line']['total']);
 echo ((is_array($_tmp=$this->_tpl_vars['filebody'][$this->_sections['file_line']['index']])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html'));  endfor; endif; ?>
</textarea>
<p />
<input type="submit" value="&nbsp;<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_save'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
&nbsp;" />
&nbsp;&nbsp;&nbsp;
<input type="button" value="&nbsp;<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_cancel'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
&nbsp;" onclick="javascript: history.go(-1);" />
</form>

<?php if ($this->_tpl_vars['nopreview'] == ""): ?>
<form method="get" action="file_edit.php" target="_blank">
<input type="hidden" name="filename" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['filename'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
<input type="hidden" name="dir" value="<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['dir'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" />
<input type="hidden" name="mode" value="preview" />
<input type="hidden" name="opener" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['opener'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />

<?php echo $this->_tpl_vars['lng']['txt_preview_template_note']; ?>

<br />
<br />
<table cellspacing="0" cellpadding="0">
<tr>
	<td><input type="checkbox" id="use_default_css" name="use_default_css" value="1" /></td>
	<td><label for="use_default_css"><?php echo $this->_tpl_vars['lng']['lbl_preview_default_css']; ?>
</label></td>
</tr>
</table>
<input type="submit" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_preview'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
</form>
<br/ >
<?php endif; ?>

<?php endif; ?>

<form method="post" action="file_edit.php">
<input type="hidden" name="filename" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['filename'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
<input type="hidden" name="dir" value="<?php echo ((is_array($_tmp=$GLOBALS['HTTP_GET_VARS']['dir'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
" />
<input type="hidden" name="mode" value="restore" />
<input type="hidden" name="opener" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['opener'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />

<?php echo $this->_tpl_vars['lng']['txt_restore_template_note']; ?>

<br />
<input type="submit" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_restore_file'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
</form>

<?php $this->_smarty_vars['capture']['dialog'] = ob_get_contents(); ob_end_clean();  $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "dialog.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_edit_file'],'content' => $this->_smarty_vars['capture']['dialog'],'extra' => 'width="100%"')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>